//
// Created by 11510 on 2024/6/15.
//

#ifndef CNTWORD_DICTIONARY_H
#define CNTWORD_DICTIONARY_H

#include <string>
#include <map>
#include <unordered_map>

using std::string;
using std::map;
using std::pair;
using std::unordered_map;



class Dictionary {
private:
    unordered_map<string, int> wordTable;
    map<string, int> wordMap;
public:
    Dictionary() {}

    ~Dictionary() {}

    void read(const string &filename);

    void store(const string &filename);

private:
    bool isWord(const std::string &str);
};


#endif //CNTWORD_DICTIONARY_H
